﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace DualityClient.MenuComponents
{
    public abstract class GuiControl
    {
        protected Texture2D controlbackground;
        protected Vector2 position;
        public abstract void Update(GameTime gameTime);
        public abstract void Draw(GameTime gameTime);

        public bool isHovering()
        {
            if (Mouse.GetState().X > position.X && Mouse.GetState().X < position.X + controlbackground.Width && Mouse.GetState().Y > position.Y && Mouse.GetState().Y < position.Y + controlbackground.Height)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
